<html>
<head><meta charset="utf-8"><title>docs.rs compile times · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html">docs.rs compile times</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="222226479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226479">(Jan 10 2021 at 15:14)</a>:</h4>
<p>Is there a way to see what metadata is being loaded for a crate?</p>



<a name="222226486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226486">(Jan 10 2021 at 15:14)</a>:</h4>
<p><a href="http://docs.rs">docs.rs</a> is relatively small but has <em>enormous</em> incremental times, I think because it has so many dependencies</p>



<a name="222226494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226494">(Jan 10 2021 at 15:15)</a>:</h4>
<p>like, 20 seconds or more for println</p>



<a name="222226511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226511">(Jan 10 2021 at 15:15)</a>:</h4>
<p>have you done <code>-Z time-passes</code></p>



<a name="222226514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226514">(Jan 10 2021 at 15:15)</a>:</h4>
<p>yeah, let me find it</p>



<a name="222226550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226550">(Jan 10 2021 at 15:16)</a>:</h4>
<p>and checked that the time is being spent in rusticc, as opposed to llvm?</p>



<a name="222226576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226576">(Jan 10 2021 at 15:17)</a>:</h4>
<p>oh booo yeah you're right <a href="#narrow/stream/122651-general/topic/Tips.20to.20improve.20compile.20times.20within.20a.20crate.3F/near/215049372">https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Tips.20to.20improve.20compile.20times.20within.20a.20crate.3F/near/215049372</a></p>



<a name="222226592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226592">(Jan 10 2021 at 15:17)</a>:</h4>
<p>have you changed any of the codegen unit settings?</p>



<a name="222226597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226597">(Jan 10 2021 at 15:17)</a>:</h4>
<p>also, let's move to another topic</p>



<a name="222226678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226678">(Jan 10 2021 at 15:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222226592">said</a>:</p>
<blockquote>
<p>have you changed any of the codegen unit settings?</p>
</blockquote>
<p>yes: <a href="https://github.com/rust-lang/docs.rs/pull/1142">https://github.com/rust-lang/docs.rs/pull/1142</a></p>



<a name="222226730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226730">(Jan 10 2021 at 15:20)</a>:</h4>
<p>it's possible that a large number of LLVM modules are getting invalided</p>



<a name="222226733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226733">(Jan 10 2021 at 15:20)</a>:</h4>
<p>I think there's a flag to print that</p>



<a name="222226734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226734">(Jan 10 2021 at 15:20)</a>:</h4>
<p>just a minute</p>



<a name="222226765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226765">(Jan 10 2021 at 15:21)</a>:</h4>
<p>I need to try <code>debuginfo = 1</code> and see if that helps</p>



<a name="222226772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226772">(Jan 10 2021 at 15:21)</a>:</h4>
<p>try <code>RUSTC_LOG="rustc_codegen_llvm::back::lto=info"</code></p>



<a name="222226814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226814">(Jan 10 2021 at 15:22)</a>:</h4>
<p>(it will take me a second, this is my first full build with 1.49)</p>



<a name="222226822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226822">(Jan 10 2021 at 15:22)</a>:</h4>
<p>and look for how many "re-used" vs "re-compiled" lines you get</p>



<a name="222226823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226823">(Jan 10 2021 at 15:22)</a>:</h4>
<p>we <em>really</em> need to work on the number of dependencies</p>



<a name="222226831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222226831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222226831">(Jan 10 2021 at 15:22)</a>:</h4>
<p>rust development in a nutshell</p>



<a name="222227035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227035">(Jan 10 2021 at 15:27)</a>:</h4>
<p>oh also the memory spike when compiling <a href="http://docs.rs">docs.rs</a> at the end usually crashes my laptop lol</p>



<a name="222227044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227044">(Jan 10 2021 at 15:27)</a>:</h4>
<p>and that I <em>do</em> think is related to metadata but I don't know how to measure it</p>



<a name="222227105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227105">(Jan 10 2021 at 15:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222226772">said</a>:</p>
<blockquote>
<p>try <code>RUSTC_LOG="rustc_codegen_llvm::back::lto=info"</code></p>
</blockquote>
<p>this gave me no output</p>



<a name="222227107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227107">(Jan 10 2021 at 15:28)</a>:</h4>
<div class="codehilite"><pre><span></span><code>&gt; RUSTC_LOG=&quot;rustc_codegen_llvm::back::lto=info&quot; cargo build
   Compiling docs-rs v0.6.0 (/home/joshua/src/rust/docs.rs)
    Finished dev [unoptimized + debuginfo] target(s) in 14.08s
</code></pre></div>



<a name="222227118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227118">(Jan 10 2021 at 15:28)</a>:</h4>
<p>actually rustc_codegen_llvm in general has no output</p>



<a name="222227138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227138">(Jan 10 2021 at 15:29)</a>:</h4>
<p>oh, right</p>



<a name="222227141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227141">(Jan 10 2021 at 15:29)</a>:</h4>
<p>you're doing a debug build, so there won't be any lto</p>



<a name="222227143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227143">(Jan 10 2021 at 15:29)</a>:</h4>
<p>uh</p>



<a name="222227151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227151">(Jan 10 2021 at 15:29)</a>:</h4>
<p>codegen_ssa has a bunch of output though</p>



<a name="222227159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227159">(Jan 10 2021 at 15:29)</a>:</h4>
<p>I don't actually know how we invoke LLVM when we're not doing lto</p>



<a name="222227212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227212">(Jan 10 2021 at 15:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222227151">said</a>:</p>
<blockquote>
<p>codegen_ssa has a bunch of output though</p>
</blockquote>
<p>mostly things like</p>
<div class="codehilite"><pre><span></span><code>INFO rustc_codegen_ssa::base codegen_instance(&lt;std::io::Write::write_fmt::Adaptor&lt;std::io::BufWriter&lt;&amp;mut hyper::net::HttpStream&gt;&gt; as std::fmt::Write&gt;::write_char)
</code></pre></div>



<a name="222227223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227223">(Jan 10 2021 at 15:30)</a>:</h4>
<p>seems weird that it's recompiling all the dependencies when I only modified my own crate :/</p>



<a name="222227245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227245">(Jan 10 2021 at 15:31)</a>:</h4>
<p>I don't <em>think</em> anything is marked inline(always), let me double check</p>



<a name="222227308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227308">(Jan 10 2021 at 15:32)</a>:</h4>
<p>some stuff in <code>comrak</code> but I wouldn't expect that to take up so much time</p>



<a name="222227497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227497">(Jan 10 2021 at 15:37)</a>:</h4>
<p>ok</p>



<a name="222227500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227500">(Jan 10 2021 at 15:37)</a>:</h4>
<p>if you have a debug-assertions enabled build of the compiler</p>



<a name="222227563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227563">(Jan 10 2021 at 15:39)</a>:</h4>
<p>then invoke it with <code>RUSTC_LOG="rustc_session::cgu_reuse_track=debug" RUSTFLAGS="-Z query-dep-graph"</code></p>



<a name="222227565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227565">(Jan 10 2021 at 15:39)</a>:</h4>
<p>there really needs to be an easier way to do this</p>



<a name="222227567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227567">(Jan 10 2021 at 15:39)</a>:</h4>
<p>then, take a look at the <code>set_actual_reuse</code> messages</p>



<a name="222227620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227620">(Jan 10 2021 at 15:40)</a>:</h4>
<p>trying that now</p>



<a name="222227624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227624">(Jan 10 2021 at 15:40)</a>:</h4>
<p>(has to rebuild from scratch again)</p>



<a name="222227750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227750">(Jan 10 2021 at 15:45)</a>:</h4>
<div class="codehilite"><pre><span></span><code>DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4kc3514mflbdci4b&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4zihw79ioi5fmfzr&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1gib4t75zcbp4yrq&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4azx5zqrqb5rg0kx&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1o0zrbbryr756loy&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;6byd17tzvjehtfe&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;16mk9a2n0oxhhm4u&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3wlnoxx2jdofpuno&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1hcdtsvqg7mmwyx4&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3j6uizm9aif4u429&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4zjf5ki9tvpomiex&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;26cso2fuuae0bjxe&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4mfmebstuy7i9m7f&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1jtnt9ndq7s144yc&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2ftzf3u0ueopsw8g&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1yvhcis448l0q4vd&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3o64vf5ct1v8zaop&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4vgvugu0xhuupeqf&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4k58vl2zlra9n1cp&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;250mmy52w6si9168&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;b53mw17xjs5f0eg&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4jwovsxxr1cikxlj&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;21uxua7inrppdqjo&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4fcz9c7ara3yxrs&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;5g0gl86aar6t27ia&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3xjbqbqq5qoiwg4q&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3aloe1hx0bo3ww9r&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2wt9o23a0lz23ztc&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3usl7i7zyqnjqnve&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;23bogtk60mkhpqho&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1ma9iajyejrlqkwj&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;duq1o9mwbyeka76&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1bn682lkk9s8k2ab&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3d04vatfn0wga9cx&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;12ondo2h1p9x65p4&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4os01jlkelavezey&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4iw4uo1atjxizlhw&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;ik59be2bv3dxg5o&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1wsk9qln7agaa7w4&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2t2mn22fco1anbfj&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;24mrc6fgawfyc4y6&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4qylpoalg6eiit4p&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;233zqh27j1tbci6u&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1bu4oo2jijymehdt&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3whgaxu4h1c5jcyp&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;329r7z1qwhwuxq6d&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;61ijsub69htib7a&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;31xm8e3xuy8smflv&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;21j9463pi4l3yzmx&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;l0pe645eerp1oe9&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3pd4pdx2ov8fxuyb&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;5bfpayma57uhtvm2&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4lek6ezkr49i3fz5&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;35tn8inc2nlc4icj&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;22g4h1mrid52i5i&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4tsgxazsc8y3logh&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1pi6bgl1u46mf6x&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;qqwci3h5l5sjnf1&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3afbhdjz3uz5wxq8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1g5rudo01f4679c5&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2i85p1isng432k0l&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4scr4wevkcf4y6q8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;32vu8uxr6f6p18yd&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4e8jvxab4ojbxzr8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;l8pd06qjveypzws&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4glc93rwgj5efrrs&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;kknsetkv564kwhr&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;124dyf7tvwubglx2&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;46wpkzwg146fy51g&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;47hjyv8gk2crit7a&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;azbwpwx5pc3850&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3ba8s0s212darash&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3ms2m1a13fswlk9p&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1dik91g1qtaaajdc&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4k06jge1nl4vw946&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2y2d6ddrschh4hr2&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;47gt13od33u37oyl&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;514kwrbnltvkrisu&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;31suyzefjrxg9c3m&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1ch2wru4l5bbima8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2at052g1x6zc4ugf&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3er63zn7oq99tkn6&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4vb374p1c4xwq251&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1by882mzidydwfnx&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2mp2qw20kdu7g63m&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;381c80x5yb1nhvs6&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1mc90e0nrlkza4x3&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3neuraicmdcloktf&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1hyq30mf3132wed7&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1dg540ijdsdmtv00&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;cfta5qmd62qriqx&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2ccb4iz7h3trc7xe&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;52vr8tt3xicsch6b&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4q5ch0pwlnlag4di&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3ap4apl7i2jev5h1&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;10qwkmwyalmpq9mb&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1m3k9a5itigkz2ro&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1m00vc7stgxxtrkd&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2q3wy1ov01hwc9t0&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;syr8xd87u9ym1n8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;nc9nvnmsuezw37m&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;wxyn2f4qu96modw&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4ysyuglo3f6ca7t8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1k79lseaffzilyhm&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3jxlz76krtypx27j&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2l2gg9ki00m2mm9r&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1yl4ov1lx3a8knx2&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1pe31ebskwxuso8l&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;26ogky4xtmr3qdae&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;36lbq4iomdimjnlp&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1d1et0n4hgjj38f2&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1roixjrlifpawpt8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1uj2x1ai2vlqchk4&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1dypuzywjqsr9x8h&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3l75pqg7ti3f77wn&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;291ya3epimoecy7t&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4hxvkhdzcbde21my&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;33ruku6l8ukj519h&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;509cjcbqfmbulnfz&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3tad511laibtphqz&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4jxdm9gwwv3b9pd8&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2rb2pw6jxbp8bqag&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;29duc5xqx7f2j6i7&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4qd4sgm3wucfk6ln&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3tpi4f9m6trzue5t&quot;, No)
</code></pre></div>



<a name="222227757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227757">(Jan 10 2021 at 15:45)</a>:</h4>
<p>that said I did probably the worst thing for your lazy loading scheme which is reordering the modules</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/src/lib.rs b/src/lib.rs</span>
<span class="gh">index 41adf3e..caca1e0 100644</span>
<span class="gd">--- a/src/lib.rs</span>
<span class="gi">+++ b/src/lib.rs</span>
<span class="gu">@@ -19,8 +19,8 @@ mod context;</span>
 pub mod db;
 mod docbuilder;
 mod error;
<span class="gd">-pub mod index;</span>
 mod metrics;
<span class="gi">+pub mod index;</span>
 pub mod storage;
 #[cfg(test)]
 mod test;
</code></pre></div>



<a name="222227762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227762">(Jan 10 2021 at 15:45)</a>:</h4>
<p>let me try with println</p>



<a name="222227810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227810">(Jan 10 2021 at 15:46)</a>:</h4>
<p>ok that was significantly better, only 6 seconds :)</p>



<a name="222227817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227817">(Jan 10 2021 at 15:46)</a>:</h4>
<div class="codehilite"><pre><span></span><code>DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4kc3514mflbdci4b&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4zihw79ioi5fmfzr&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1gib4t75zcbp4yrq&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4azx5zqrqb5rg0kx&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1o0zrbbryr756loy&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;6byd17tzvjehtfe&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;16mk9a2n0oxhhm4u&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3wlnoxx2jdofpuno&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1hcdtsvqg7mmwyx4&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3j6uizm9aif4u429&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4zjf5ki9tvpomiex&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;26cso2fuuae0bjxe&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4mfmebstuy7i9m7f&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1jtnt9ndq7s144yc&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2ftzf3u0ueopsw8g&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1yvhcis448l0q4vd&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3o64vf5ct1v8zaop&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4vgvugu0xhuupeqf&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4k58vl2zlra9n1cp&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;250mmy52w6si9168&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;b53mw17xjs5f0eg&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4jwovsxxr1cikxlj&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;21uxua7inrppdqjo&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4fcz9c7ara3yxrs&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;5g0gl86aar6t27ia&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3xjbqbqq5qoiwg4q&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3aloe1hx0bo3ww9r&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2wt9o23a0lz23ztc&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3usl7i7zyqnjqnve&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;23bogtk60mkhpqho&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1ma9iajyejrlqkwj&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;duq1o9mwbyeka76&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1bn682lkk9s8k2ab&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3d04vatfn0wga9cx&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;12ondo2h1p9x65p4&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4os01jlkelavezey&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4iw4uo1atjxizlhw&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;ik59be2bv3dxg5o&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1wsk9qln7agaa7w4&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2t2mn22fco1anbfj&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;24mrc6fgawfyc4y6&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4qylpoalg6eiit4p&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;233zqh27j1tbci6u&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1bu4oo2jijymehdt&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3whgaxu4h1c5jcyp&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;329r7z1qwhwuxq6d&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;61ijsub69htib7a&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;31xm8e3xuy8smflv&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;21j9463pi4l3yzmx&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;l0pe645eerp1oe9&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3pd4pdx2ov8fxuyb&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;5bfpayma57uhtvm2&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4lek6ezkr49i3fz5&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;35tn8inc2nlc4icj&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;22g4h1mrid52i5i&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4tsgxazsc8y3logh&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1pi6bgl1u46mf6x&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;qqwci3h5l5sjnf1&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3afbhdjz3uz5wxq8&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1g5rudo01f4679c5&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2i85p1isng432k0l&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4scr4wevkcf4y6q8&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;32vu8uxr6f6p18yd&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4e8jvxab4ojbxzr8&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;l8pd06qjveypzws&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4glc93rwgj5efrrs&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;kknsetkv564kwhr&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;124dyf7tvwubglx2&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;46wpkzwg146fy51g&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;47hjyv8gk2crit7a&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;azbwpwx5pc3850&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3ba8s0s212darash&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3ms2m1a13fswlk9p&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1dik91g1qtaaajdc&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4k06jge1nl4vw946&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2y2d6ddrschh4hr2&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;47gt13od33u37oyl&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;514kwrbnltvkrisu&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;31suyzefjrxg9c3m&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1ch2wru4l5bbima8&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2at052g1x6zc4ugf&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3er63zn7oq99tkn6&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4vb374p1c4xwq251&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1by882mzidydwfnx&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2mp2qw20kdu7g63m&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;381c80x5yb1nhvs6&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1mc90e0nrlkza4x3&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3neuraicmdcloktf&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1hyq30mf3132wed7&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1dg540ijdsdmtv00&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;cfta5qmd62qriqx&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2ccb4iz7h3trc7xe&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;52vr8tt3xicsch6b&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4q5ch0pwlnlag4di&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3ap4apl7i2jev5h1&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;10qwkmwyalmpq9mb&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1m3k9a5itigkz2ro&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1m00vc7stgxxtrkd&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2q3wy1ov01hwc9t0&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;syr8xd87u9ym1n8&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;nc9nvnmsuezw37m&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;wxyn2f4qu96modw&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4ysyuglo3f6ca7t8&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1k79lseaffzilyhm&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3jxlz76krtypx27j&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;2l2gg9ki00m2mm9r&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1yl4ov1lx3a8knx2&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1pe31ebskwxuso8l&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;26ogky4xtmr3qdae&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;36lbq4iomdimjnlp&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1d1et0n4hgjj38f2&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1roixjrlifpawpt8&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1uj2x1ai2vlqchk4&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;1dypuzywjqsr9x8h&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;3l75pqg7ti3f77wn&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;291ya3epimoecy7t&quot;, No)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;4hxvkhdzcbde21my&quot;, PostLto)
DEBUG rustc_session::cgu_reuse_tracker set_actual_reuse(&quot;33ruku6l8ukj519h&quot;, PostLto)
</code></pre></div>



<a name="222227826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227826">(Jan 10 2021 at 15:47)</a>:</h4>
<p>I don't know what PostLto means</p>



<a name="222227904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227904">(Jan 10 2021 at 15:49)</a>:</h4>
<p>I thought it was 20 seconds for print?</p>



<a name="222227948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227948">(Jan 10 2021 at 15:50)</a>:</h4>
<p>these timings are really off because they're on a different machine</p>



<a name="222227950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227950">(Jan 10 2021 at 15:50)</a>:</h4>
<p>my laptop can't compile rustc <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="222227951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227951">(Jan 10 2021 at 15:50)</a>:</h4>
<p>also, reordering modules within a crate shouldn't really do anything</p>



<a name="222227954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227954">(Jan 10 2021 at 15:50)</a>:</h4>
<p>all of the spans of items inside the modules will stay the same</p>



<a name="222227957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227957">(Jan 10 2021 at 15:50)</a>:</h4>
<p>and it's a local crate, so the scheme I talked about early shouldn't come into pay</p>



<a name="222227960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227960">(Jan 10 2021 at 15:50)</a>:</h4>
<p>play</p>



<a name="222227961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227961">(Jan 10 2021 at 15:50)</a>:</h4>
<p><span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span> It took 3 times as long as adding println</p>



<a name="222227970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227970">(Jan 10 2021 at 15:51)</a>:</h4>
<p>where did you add <code>println!</code>?</p>



<a name="222227972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222227972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222227972">(Jan 10 2021 at 15:51)</a>:</h4>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/src/web/mod.rs b/src/web/mod.rs</span>
<span class="gh">index 97a4290..ac7cb7d 100644</span>
<span class="gd">--- a/src/web/mod.rs</span>
<span class="gi">+++ b/src/web/mod.rs</span>
<span class="gu">@@ -220,6 +220,7 @@ impl Handler for CratesfyiHandler {</span>
                     }

                     debug!("Path not found: {}; {}", DebugPath(&amp;req.url), e.error);
<span class="gi">+                    debug!("some text");</span>
                 }

                 Self::chain(self.inject_extensions.clone(), err).handle(req)
</code></pre></div>



<a name="222228018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228018">(Jan 10 2021 at 15:52)</a>:</h4>
<p>I see</p>



<a name="222228020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228020">(Jan 10 2021 at 15:52)</a>:</h4>
<p>most 'normal' changes will touch src/web/mod.rs which is why I chose it</p>



<a name="222228023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228023">(Jan 10 2021 at 15:52)</a>:</h4>
<p>unfortunately, I think a lot of that time is legitimate</p>



<a name="222228025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228025">(Jan 10 2021 at 15:52)</a>:</h4>
<p>there are a bunch of things after that line in the file</p>



<a name="222228026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228026">(Jan 10 2021 at 15:52)</a>:</h4>
<p>adding a line will modify all of those spans</p>



<a name="222228027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228027">(Jan 10 2021 at 15:52)</a>:</h4>
<p>no no the println time was fine</p>



<a name="222228028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228028">(Jan 10 2021 at 15:52)</a>:</h4>
<p><code>PostLto</code> seems to be re-using the output of lto if lto is enabled or just the output of regular codegen if no lto is performed: <a href="https://github.com/rust-lang/rust/blob/99ad5a1a2824fea1ecf60068fd3636beae7ea2da/compiler/rustc_codegen_ssa/src/base.rs#L874-L876">https://github.com/rust-lang/rust/blob/99ad5a1a2824fea1ecf60068fd3636beae7ea2da/compiler/rustc_codegen_ssa/src/base.rs#L874-L876</a></p>



<a name="222228029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228029">(Jan 10 2021 at 15:52)</a>:</h4>
<p>causing us to need to re-run a bunch of queries</p>



<a name="222228030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228030">(Jan 10 2021 at 15:52)</a>:</h4>
<p>I mean, not <em>great</em>, but 6 seconds is livable</p>



<a name="222228033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228033">(Jan 10 2021 at 15:52)</a>:</h4>
<p>it's reordering the module that takes forever</p>



<a name="222228037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228037">(Jan 10 2021 at 15:52)</a>:</h4>
<p>that's incredibly weird</p>



<a name="222228043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228043">(Jan 10 2021 at 15:53)</a>:</h4>
<p>can you do the same invocation for recording the modules?</p>



<a name="222228053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228053">(Jan 10 2021 at 15:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222228043">said</a>:</p>
<blockquote>
<p>can you do the same invocation for recording the modules?</p>
</blockquote>
<p><a href="#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222227750">https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222227750</a></p>



<a name="222228063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228063">(Jan 10 2021 at 15:53)</a>:</h4>
<p>was that message from a warm incremental cache?</p>



<a name="222228111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228111">(Jan 10 2021 at 15:54)</a>:</h4>
<p>I don't know what warm means in this context. I did a full build before making the change.</p>



<a name="222228116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228116">(Jan 10 2021 at 15:54)</a>:</h4>
<p>had you done a full build with that <code>RUSTFLAGS</code>?</p>



<a name="222228120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228120">(Jan 10 2021 at 15:54)</a>:</h4>
<p>because that's showing that literally every module needed to be rebuilt</p>



<a name="222228134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228134">(Jan 10 2021 at 15:54)</a>:</h4>
<p>this is with <code>cargo rustc</code> so I woudln't have to do a full rebuild</p>



<a name="222228136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228136">(Jan 10 2021 at 15:54)</a>:</h4>
<p>(full rebuilds take like 5 minutes)</p>



<a name="222228143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228143">(Jan 10 2021 at 15:55)</a>:</h4>
<div class="codehilite"><pre><span></span><code>RUSTC_LOG=&quot;rustc_session::cgu_reuse_track=debug&quot; cargo +rustc2 rustc --lib -- -Z query-dep-graph
</code></pre></div>



<a name="222228145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228145">(Jan 10 2021 at 15:55)</a>:</h4>
<p>I don't know if cargo rustc turns on incremental compilation or not</p>



<a name="222228146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228146">(Jan 10 2021 at 15:55)</a>:</h4>
<p>I'll try to reproduce this locally</p>



<a name="222228150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228150">(Jan 10 2021 at 15:55)</a>:</h4>
<p>if it's actually rebuilding every module, that would certainly explain the compilation times</p>



<a name="222228200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228200">(Jan 10 2021 at 15:56)</a>:</h4>
<p>I would expect it to, the command line (without --extern because there's like 400) is</p>
<div class="codehilite"><pre><span></span><code>rustc --crate-name docs_rs --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -Z query-dep-graph -C metadata=1d8b36df000bbc77 -C extra-filename=-1d8b36df000bbc77 --out-dir /home/joshua/docs.rs/target/debug/deps -C incremental=/home/joshua/docs.rs/target/debug/incremental -L dependency=/home/joshua/docs.rs/target/debug/deps
</code></pre></div>



<a name="222228209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222228209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222228209">(Jan 10 2021 at 15:56)</a>:</h4>
<p>which has -C incremental=... at the end</p>



<a name="222241691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241691">(Jan 10 2021 at 20:57)</a>:</h4>
<p>ok, I found out why all of the cgus are being invalidated</p>



<a name="222241733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241733">(Jan 10 2021 at 20:58)</a>:</h4>
<p>re-ordering the modules changes the crate hash, which changes the hash of <code>hir_owner(crate)</code></p>



<a name="222241734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241734">(Jan 10 2021 at 20:58)</a>:</h4>
<p>I'm pretty sure that's legitimate</p>



<a name="222241740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241740">(Jan 10 2021 at 20:58)</a>:</h4>
<p>why do they change the crate hash?</p>



<a name="222241743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241743">(Jan 10 2021 at 20:58)</a>:</h4>
<p>during codegen, we directly access <code>tcx.hir()</code> as a result of looking up an associated item</p>



<a name="222241744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241744">(Jan 10 2021 at 20:58)</a>:</h4>
<p>without any intermediate query</p>



<a name="222241752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241752">(Jan 10 2021 at 20:59)</a>:</h4>
<p>I don't follow, sorry</p>



<a name="222241756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241756">(Jan 10 2021 at 20:59)</a>:</h4>
<p>don't lots of things call tcx.hir()?</p>



<a name="222241759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241759">(Jan 10 2021 at 20:59)</a>:</h4>
<p><code>tcx.hir()</code> is a no-op, how does it invalidate anything?</p>



<a name="222241767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241767">(Jan 10 2021 at 20:59)</a>:</h4>
<p>the crate hash is computed (in part) by hashing a bunch of items, in-order</p>



<a name="222241819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241819">(Jan 10 2021 at 21:00)</a>:</h4>
<p>well, <code>tcx.hir().get</code></p>



<a name="222241829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241829">(Jan 10 2021 at 21:00)</a>:</h4>
<p>however, I think the hash of the CodegenUnit is also changing</p>



<a name="222241869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241869">(Jan 10 2021 at 21:01)</a>:</h4>
<p>oh, I see</p>



<a name="222241899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241899">(Jan 10 2021 at 21:02)</a>:</h4>
<p>we don't actually hash the CodegenUnit - it's an LLVM object, so we can't</p>



<a name="222241919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241919">(Jan 10 2021 at 21:02)</a>:</h4>
<p>instead, we just check that none of its incr-comp dependencies changed</p>



<a name="222241921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241921">(Jan 10 2021 at 21:02)</a>:</h4>
<p>so, having a direct dependency on the crate hash is enough to invalidate the entire CodegenUnit</p>



<a name="222241929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222241929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222241929">(Jan 10 2021 at 21:02)</a>:</h4>
<p>I think the solution is to add an intermediate query</p>



<a name="222242005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242005">(Jan 10 2021 at 21:04)</a>:</h4>
<p>the issue is that you're sending large chunks to LLVM at once, and changing any part of the chunk invalidates the whole thing?</p>



<a name="222242008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242008">(Jan 10 2021 at 21:04)</a>:</h4>
<p>why would an intermediate query help?</p>



<a name="222242022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242022">(Jan 10 2021 at 21:05)</a>:</h4>
<p>the issue isn't in LLVM itself - it's in how we track changes via the query system</p>



<a name="222242029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242029">(Jan 10 2021 at 21:05)</a>:</h4>
<p>the 'red/green' system allows us to re-compute a standard query if one of its inputs changes</p>



<a name="222242034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242034">(Jan 10 2021 at 21:06)</a>:</h4>
<p>if the result is the same, we can mark that query as green</p>



<a name="222242069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242069">(Jan 10 2021 at 21:06)</a>:</h4>
<p>so, if we have</p>



<a name="222242081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242081">(Jan 10 2021 at 21:06)</a>:</h4>
<p><code>typeck(MyStruct) -&gt; hir(MyStruct)</code>, and <code>hir(MyStruct)</code> changes</p>



<a name="222242090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242090">(Jan 10 2021 at 21:06)</a>:</h4>
<p>wait, does -&gt; represent an output or a dependency?</p>



<a name="222242096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242096">(Jan 10 2021 at 21:06)</a>:</h4>
<p>then the query system will automatically re-run <code>typeck(MyStruct)</code> - if the hash of the result is unchanged, then we will mark <code>typeck(MyStruct)</code> as green</p>



<a name="222242097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242097">(Jan 10 2021 at 21:06)</a>:</h4>
<p>a dependency</p>



<a name="222242107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242107">(Jan 10 2021 at 21:07)</a>:</h4>
<p>However, <code>CompileCodegenUnit</code> is special - it's not a normal query</p>



<a name="222242116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242116">(Jan 10 2021 at 21:07)</a>:</h4>
<p>we don't have a way of hashing it, so we instead check if any of its dependencies changed</p>



<a name="222242123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242123">(Jan 10 2021 at 21:07)</a>:</h4>
<p>even if the dependency change won't actually affect the result</p>



<a name="222242165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242165">(Jan 10 2021 at 21:08)</a>:</h4>
<p>by adding an intermediate query, the query system can re-run that intermediate query, marking it as green if the result doesn't change</p>



<a name="222242171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242171">(Jan 10 2021 at 21:08)</a>:</h4>
<p>and one of the dependencies is currently "the whole crate"?</p>



<a name="222242178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242178">(Jan 10 2021 at 21:08)</a>:</h4>
<p>Essentially</p>



<a name="222242182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242182">(Jan 10 2021 at 21:08)</a>:</h4>
<p>ok, that makes sense</p>



<a name="222242183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242183">(Jan 10 2021 at 21:08)</a>:</h4>
<p>here's the stacktrace</p>



<a name="222242197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242197">(Jan 10 2021 at 21:08)</a>:</h4>
<p><a href="https://gist.github.com/Aaron1011/22d61cd7c3f0482f6c40c14886ee0521">https://gist.github.com/Aaron1011/22d61cd7c3f0482f6c40c14886ee0521</a></p>



<a name="222242206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242206">(Jan 10 2021 at 21:09)</a>:</h4>
<p>so, <code>opt_associated_item</code> should probably be query-ified</p>



<a name="222242209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242209">(Jan 10 2021 at 21:09)</a>:</h4>
<p>or maybe <code>impl_of_method</code></p>



<a name="222242211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242211">(Jan 10 2021 at 21:09)</a>:</h4>
<p>how did you tell the query system <code>hir_owner</code> is a 'forbidden edge'?</p>



<a name="222242217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242217">(Jan 10 2021 at 21:09)</a>:</h4>
<p><code>RUST_FORBID_DEP_GRAPH_EDGE="hir_own-&gt;Co"</code></p>



<a name="222242222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242222">(Jan 10 2021 at 21:09)</a>:</h4>
<p>there's a page on it in the rustc-dev-guide</p>



<a name="222242275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242275">(Jan 10 2021 at 21:10)</a>:</h4>
<p>also, the syntax of that is backwards from what you'd expect</p>



<a name="222242277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242277">(Jan 10 2021 at 21:10)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222242206">said</a>:</p>
<blockquote>
<p>so, <code>opt_associated_item</code> should probably be query-ified</p>
</blockquote>
<p>how much overhead is there to making things go through queries? as opposed to a normal function call</p>



<a name="222242286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242286">(Jan 10 2021 at 21:10)</a>:</h4>
<p>I'm not sure exactly</p>



<a name="222242299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242299">(Jan 10 2021 at 21:11)</a>:</h4>
<p>in the past, I did this same thing for <code>Instance::resolve</code>, which gave big wins for incremental</p>



<a name="222242311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242311">(Jan 10 2021 at 21:11)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/67797">https://github.com/rust-lang/rust/pull/67797</a></p>



<a name="222242389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242389">(Jan 10 2021 at 21:13)</a>:</h4>
<p>this would also help rustdoc I think</p>



<a name="222242408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242408">(Jan 10 2021 at 21:13)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/080ee6f5d7e262b1c5fd51a0bdac62b62d0ee546/src/librustdoc/passes/collect_intra_doc_links.rs#L390">https://github.com/rust-lang/rust/blob/080ee6f5d7e262b1c5fd51a0bdac62b62d0ee546/src/librustdoc/passes/collect_intra_doc_links.rs#L390</a></p>



<a name="222242412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242412">(Jan 10 2021 at 21:13)</a>:</h4>
<p>oh wait this goes the other way</p>



<a name="222242431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242431">(Jan 10 2021 at 21:14)</a>:</h4>
<p><code>opt_associated_item</code> is when you <em>already</em> have the associated item</p>



<a name="222242630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242630">(Jan 10 2021 at 21:18)</a>:</h4>
<p>actually, that stacktrace might be for the wrong call to <code>hir_owner</code></p>



<a name="222242956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242956">(Jan 10 2021 at 21:26)</a>:</h4>
<p>ok, here's the correct stacktrace: <a href="https://gist.github.com/Aaron1011/4d04e6bf53bab8a3187c1e3a7918d387">https://gist.github.com/Aaron1011/4d04e6bf53bab8a3187c1e3a7918d387</a></p>



<a name="222242990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242990">(Jan 10 2021 at 21:27)</a>:</h4>
<p>so, it looks like we should actually query-ify <code>needs_gdb_debug_scripts_section</code></p>



<a name="222242994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242994">(Jan 10 2021 at 21:27)</a>:</h4>
<p>I'll also investigate why the crate hash is changing</p>



<a name="222242999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222242999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222242999">(Jan 10 2021 at 21:28)</a>:</h4>
<p>after looking more closely at how it's computed, it should be resistant to something like re-ordering the modules</p>



<a name="222243069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243069">(Jan 10 2021 at 21:30)</a>:</h4>
<p>For the case of <code>krate_attrs</code>, <a href="https://github.com/rust-lang/rust/issues/79519">#79519</a> should help.</p>



<a name="222243115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243115">(Jan 10 2021 at 21:30)</a>:</h4>
<p>For the case of <code>opt_associated_item</code>, this requires a deeper refactoring I'm afraid.</p>



<a name="222243133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243133">(Jan 10 2021 at 21:31)</a>:</h4>
<p>that didn't actually end up affecting this case</p>



<a name="222243145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243145">(Jan 10 2021 at 21:31)</a>:</h4>
<p>however, query-ifying it would probably still be a good idea, since any changes to its input will invalidate the entire codegen unit</p>



<a name="222243149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243149">(Jan 10 2021 at 21:31)</a>:</h4>
<p>even if the output is unchanged</p>



<a name="222243252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243252">(Jan 10 2021 at 21:33)</a>:</h4>
<p>ok, it looks like the crate hash gets changed due to the span of those modules changing</p>



<a name="222243296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243296">(Jan 10 2021 at 21:34)</a>:</h4>
<p>so, this case should also be helped by <span class="user-mention" data-user-id="248906">@cjgillot</span> 's work to move spans to side tables</p>



<a name="222243328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243328">(Jan 10 2021 at 21:35)</a>:</h4>
<p>another strategy might be to try to adapt <code>llvm::computeLTOCacheKey</code> for a non-LTO module</p>



<a name="222243341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243341">(Jan 10 2021 at 21:35)</a>:</h4>
<p>that is, actually try to hash the LLVM module we create, instead of using our query system to determine if we need to run codegen</p>



<a name="222243393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243393">(Jan 10 2021 at 21:36)</a>:</h4>
<p>however, I think we'd basically need to create that from scratch, so it could be very fragile across LLVM upgrades</p>



<a name="222243400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243400">(Jan 10 2021 at 21:36)</a>:</h4>
<p>because this is working on an existing LLVM module, and optimizing it in place? That seems more reliable, yeah. How expensive would it be to hash the module?</p>



<a name="222243470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243470">(Jan 10 2021 at 21:38)</a>:</h4>
<p>I'm not sure</p>



<a name="222243478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243478">(Jan 10 2021 at 21:38)</a>:</h4>
<p>someone more familiar with LLVM would need to take a look at that</p>



<a name="222243483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243483">(Jan 10 2021 at 21:39)</a>:</h4>
<p>I don't even know if this is remotely feasible</p>



<a name="222243488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243488">(Jan 10 2021 at 21:39)</a>:</h4>
<p>so, in order of increasing difficulty, the fixes for this are:</p>



<a name="222243491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243491">(Jan 10 2021 at 21:39)</a>:</h4>
<ol>
<li>query-ify <code>needs_gdb_debug_scripts_section</code></li>
</ol>



<a name="222243493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243493">(Jan 10 2021 at 21:39)</a>:</h4>
<ol start="2">
<li>move attributes to a side table</li>
</ol>



<a name="222243497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243497">(Jan 10 2021 at 21:40)</a>:</h4>
<ol start="3">
<li>stop using the query system to track module reuse,  and instead try to hash the LLVM module somehow</li>
</ol>



<a name="222243559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243559">(Jan 10 2021 at 21:41)</a>:</h4>
<p>actually, wait</p>



<a name="222243568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243568">(Jan 10 2021 at 21:41)</a>:</h4>
<p>we use the query system to determine if we should even generate the module in the first place, as opposed to re-using it from disk</p>



<a name="222243615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243615">(Jan 10 2021 at 21:42)</a>:</h4>
<p>so you could feasibly do both? use the query system to avoid generating it, once it's generated hash it to see if the optimized module is cached?</p>



<a name="222243621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243621">(Jan 10 2021 at 21:42)</a>:</h4>
<p>yeah</p>



<a name="222243625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243625">(Jan 10 2021 at 21:42)</a>:</h4>
<p>it wouldn't help in debug mode, I think</p>



<a name="222243633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243633">(Jan 10 2021 at 21:43)</a>:</h4>
<p>but could help in a non-lto release mode, I think</p>



<a name="222243642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243642">(Jan 10 2021 at 21:43)</a>:</h4>
<p>hmm, my original times were in debug mode</p>



<a name="222243650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243650">(Jan 10 2021 at 21:43)</a>:</h4>
<p>e.g. we could skip re-running optimizations on a module, if we know that the input module is the same (by comparing the hash)</p>



<a name="222243699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243699">(Jan 10 2021 at 21:44)</a>:</h4>
<p>was the slow part generating the module in the first place? I don't know what the inputs and outputs of <code>cgu_reuse_tracker</code> are</p>



<a name="222243708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243708">(Jan 10 2021 at 21:44)</a>:</h4>
<p>do you still have the pass timings?</p>



<a name="222243718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243718">(Jan 10 2021 at 21:44)</a>:</h4>
<p>I can generate them pretty easily, one sec</p>



<a name="222243769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243769">(Jan 10 2021 at 21:46)</a>:</h4>
<p>For <code>opt_associated_item</code>, going through the HIR was not even necessary. Filed <a href="https://github.com/rust-lang/rust/issues/80889">#80889</a>.</p>



<a name="222243815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243815">(Jan 10 2021 at 21:47)</a>:</h4>
<p>improvements to the query system will let us skip the rust-side codegen of the LLVM module</p>



<a name="222243822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243822">(Jan 10 2021 at 21:47)</a>:</h4>
<p>while implementing the module hashing scheme could potentially let us re-use the output object file, and skip running our codegenned module through LLVM</p>



<a name="222243885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243885">(Jan 10 2021 at 21:48)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times/near/222243497">said</a>:</p>
<blockquote>
<ol start="3">
<li>stop using the query system to track module reuse,  and instead try to hash the LLVM module somehow</li>
</ol>
</blockquote>
<p>Another solution would be to audit all the accesses to the HIR from CompileCodegenUnit, and then hard-forbid such dependencies.</p>



<a name="222243896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243896">(Jan 10 2021 at 21:48)</a>:</h4>
<p>yeah, that souds like a good idea</p>



<a name="222243902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243902">(Jan 10 2021 at 21:49)</a>:</h4>
<p>ugh I don't have <code>summarize</code> installed, one sec</p>



<a name="222243966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243966">(Jan 10 2021 at 21:50)</a>:</h4>
<div class="codehilite"><pre><span></span><code>&gt; summarize summarize docs_rs-31336.mm_profdata
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| Item                                             | Self time | % of total time | Time     | Item count | Incremental load time |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| LLVM_module_codegen_emit_obj                     | 8.47s     | 32.211          | 8.47s    | 256        | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| LLVM_passes                                      | 6.54s     | 24.880          | 6.54s    | 1          | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| codegen_module                                   | 5.96s     | 22.647          | 6.68s    | 256        | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| monomorphization_collector_graph_walk            | 783.81ms  | 2.981           | 1.66s    | 1          | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| LLVM_module_codegen                              | 560.98ms  | 2.133           | 9.03s    | 256        | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| expand_crate                                     | 450.84ms  | 1.714           | 531.46ms | 1          | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| evaluate_obligation                              | 221.15ms  | 0.841           | 227.17ms | 7306       | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| cgu_partitioning                                 | 192.88ms  | 0.733           | 257.60ms | 1          | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| resolve_instance                                 | 180.35ms  | 0.686           | 367.38ms | 22189      | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+-----------------------+
| LLVM_module_optimize_module_passes               | 164.37ms  | 0.625           | 164.37ms | 256        | 0.00ns                |
+--------------------------------------------------+-----------+-----------------+----------+------------+----------------------
</code></pre></div>



<a name="222243972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243972">(Jan 10 2021 at 21:50)</a>:</h4>
<p>so, it looks like the could be substantial wins from adding an a hashing-based approach</p>



<a name="222243980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243980">(Jan 10 2021 at 21:50)</a>:</h4>
<p>we could skip <code>LLVM_module_codegen_emit_obj</code> and <code>LLVM_passes</code></p>



<a name="222243990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243990">(Jan 10 2021 at 21:51)</a>:</h4>
<p>assuming that spans from the re-ordered module identifiers don't somehow find their way into the output</p>



<a name="222243991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222243991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222243991">(Jan 10 2021 at 21:51)</a>:</h4>
<p>that's half the time right there :D</p>



<a name="222244051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244051">(Jan 10 2021 at 21:52)</a>:</h4>
<p><code>codegen_module</code> takes much longer than I thought it would</p>



<a name="222244063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244063">(Jan 10 2021 at 21:52)</a>:</h4>
<p>so, in the case where the query system still gives us some spurious invalidations, we still have to perform a fair amount of work</p>



<a name="222244073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244073">(Jan 10 2021 at 21:52)</a>:</h4>
<p><code>codegen_module</code> corresponds to generating the LLVM module from the MIR, btw</p>



<a name="222244089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244089">(Jan 10 2021 at 21:53)</a>:</h4>
<p>Is there a way to see all the invalidations of a given query?</p>



<a name="222244091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244091">(Jan 10 2021 at 21:53)</a>:</h4>
<p>I have a feeling <a href="http://docs.rs">docs.rs</a> generates a <em>lot</em> of MIR</p>



<a name="222244094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244094">(Jan 10 2021 at 21:53)</a>:</h4>
<p>let me run LLVM-lines, one sec</p>



<a name="222244098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244098">(Jan 10 2021 at 21:53)</a>:</h4>
<p><span class="user-mention" data-user-id="248906">@cjgillot</span> There's not a particularly nice way that I know of</p>



<a name="222244127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244127">(Jan 10 2021 at 21:54)</a>:</h4>
<p>I've been using <code>rustc_query_system::dep_graph::graph=debug</code></p>



<a name="222244148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244148">(Jan 10 2021 at 21:54)</a>:</h4>
<p>which will show you which depnodes are marked red due to dependencies</p>



<a name="222244153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244153">(Jan 10 2021 at 21:54)</a>:</h4>
<p>but it's really spammy, and shows you green nodes too</p>



<a name="222244160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244160">(Jan 10 2021 at 21:54)</a>:</h4>
<p>booo incremental is unhappy</p>
<div class="codehilite"><pre><span></span><code>error[E0460]: found possibly newer version of crate `std` which `git2` depends on
 --&gt; build.rs:1:5
  |
1 | use git2::Repository;
  |     ^^^^
  |
  = note: perhaps that crate needs to be recompiled?
  = note: the following crate versions were found:
          crate `std`: /home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-fb0328f12ecfb148.rlib
          crate `std`: /home/joshua/rustc3/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-fb0328f12ecfb148.so
          crate `git2`: /home/joshua/docs.rs/target/debug/deps/libgit2-3f2c8613a0c2a869.rlib
</code></pre></div>



<a name="222244168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244168">(Jan 10 2021 at 21:54)</a>:</h4>
<p>there's also <code>-Z dep-tasks</code>, but it just shows (some) depnodes, not any edges</p>



<a name="222244342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244342">(Jan 10 2021 at 21:59)</a>:</h4>
<div class="codehilite"><pre><span></span><code>&gt; cargo +rustc3 llvm-lines --lib
  Lines          Copies        Function name
  -----          ------        -------------
  720967 (100%)  16309 (100%)  (TOTAL)
   28195 (3.9%)   1563 (9.6%)  core::ptr::drop_in_place
   13598 (1.9%)     21 (0.1%)  &lt;&amp;mut serde_json::de::Deserializer&lt;R&gt; as serde::de::Deserializer&gt;::deserialize_struct
   10727 (1.5%)     35 (0.2%)  &lt;serde_json::de::SeqAccess&lt;R&gt; as serde::de::SeqAccess&gt;::next_element_seed
    6732 (0.9%)     36 (0.2%)  alloc::raw_vec::RawVec&lt;T,A&gt;::grow_amortized
    6593 (0.9%)    110 (0.7%)  core::result::Result&lt;T,E&gt;::map
    6529 (0.9%)     91 (0.6%)  core::result::Result&lt;T,E&gt;::map_err
    6400 (0.9%)     16 (0.1%)  docs_rs::web::page::web_page::WebPage::into_response
    6348 (0.9%)     46 (0.3%)  core::alloc::layout::Layout::array
    6269 (0.9%)    106 (0.6%)  core::option::Option&lt;T&gt;::map
    5780 (0.8%)     20 (0.1%)  &lt;serde_json::de::MapAccess&lt;R&gt; as serde::de::MapAccess&gt;::next_key_seed
    5646 (0.8%)     40 (0.2%)  &lt;alloc::vec::Vec&lt;T,A&gt; as alloc::vec::spec_extend::SpecExtend&lt;T,I&gt;&gt;::spec_extend
    5145 (0.7%)     35 (0.2%)  alloc::raw_vec::RawVec&lt;T,A&gt;::allocate_in
</code></pre></div>



<a name="222244353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244353">(Jan 10 2021 at 21:59)</a>:</h4>
<p>I don't have anything to compare this to, is 720k lines a lot?</p>



<a name="222244412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244412">(Jan 10 2021 at 22:00)</a>:</h4>
<p>(also, this shows that <a href="https://github.com/rust-lang/rust/issues/77960">https://github.com/rust-lang/rust/issues/77960</a> would have a big impact I think)</p>



<a name="222244455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244455">(Jan 10 2021 at 22:01)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> also, keep in mind that <em>every</em> module is getting invalidated in your case</p>



<a name="222244504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244504">(Jan 10 2021 at 22:02)</a>:</h4>
<p>once the attribute query issue is fixed, then a (hopefully) large number of modules will be detected as green via the existing query system</p>



<a name="222244604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244604">(Jan 10 2021 at 22:04)</a>:</h4>
<p>so the other issue I've run into is that <code>cargo test</code> tends to kill my computer</p>



<a name="222244611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244611">(Jan 10 2021 at 22:05)</a>:</h4>
<p>we have a lot of different tests, I think rustc might be running out of memory?</p>



<a name="222244681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244681">(Jan 10 2021 at 22:07)</a>:</h4>
<p>Should this module reorder case be added to the perf suite? Seems like an under-investigated one.</p>



<a name="222244689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/docs.rs%20compile%20times/near/222244689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/docs.2Ers.20compile.20times.html#222244689">(Jan 10 2021 at 22:07)</a>:</h4>
<p>I think that would be a good idea</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>